package com.agann.util;

import com.agann.model.Memory;

public class Util_Factory {
	
	public static Memory createUtil (String code) {
		String[] args = code.split("@");
		String type = args[0];
		
		if (type.equals(AD.TYPE_CODE)) return new AD(code);
		if (type.equals(EMA.TYPE_CODE)) return new EMA(code);
		if (type.equals(MACD.TYPE_CODE)) return new MACD(code);
		if (type.equals(OBV.TYPE_CODE)) return new OBV(code);
		if (type.equals(RSI.TYPE_CODE)) return new RSI(code);
		if (type.equals(SROC.TYPE_CODE)) return new SROC(code);
		if (type.equals(StoK.TYPE_CODE)) return new StoK(code);
		if (type.equals(WmR.TYPE_CODE)) return new WmR(code);
		
		return null;
	}

}
